<%@page import="tx.bj12320.model.*" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib tagdir="/WEB-INF/tags/simpletable" prefix="simpletable"%>
<%@ include file="/commons/taglibs.jsp" %>

<rapid:override name="head">
	<title><%=TszbProcessInfo.TABLE_ALIAS%> 维护</title>

	<link href="<c:url value="/widgets/simpletable/simpletable.css"/>" type="text/css" rel="stylesheet">
	<script type="text/javascript" src="<c:url value="/widgets/simpletable/simpletable.js"/>"></script>

	<script type="text/javascript" >
		$(document).ready(function() {
			// 分页需要依赖的初始化动作
			window.simpleTable = new SimpleTable('queryForm',${page.thisPageNumber},${page.pageSize},'${pageRequest.sortColumns}');
		});
	</script>
</rapid:override>

<rapid:override name="content">
<s:bean name="tx.bj12320.service.DataDictManager" var="dataDictManager"></s:bean>
	<form id="queryForm" name="queryForm" action="<c:url value="/pages/TszbProcessInfo/tszbProcessInfoList.do"/>" method="post" style="display: inline;" >
	<div class="queryPanel">
		<fieldset>
			<legend>搜索</legend>
			<table>
				<tr>
					<td class="tdLabel">网络单位</td>
					<td>
						<input value="${query.orgName}" id="orgName" name="orgName" />
					</td>
					<td class="tdLabel"><%=TszbProcessInfo.ALIAS_WORK_ORDER_TYPE%></td>
					<td>
						<s:select
							  list="%{@tx.bj12320.model.enums.WorkOrderTypeEnum@toMap()}"
				                key="workOrderType"    theme="simple" headerKey=""  headerValue="请选择..." cssStyle="width:120px"/>
					</td>
					<td class="tdLabel"><%=TszbProcessInfo.ALIAS_CALLER_NAME%></td>
					<td>
						<input value="${query.callerName}" id="callerName" name="callerName" maxlength="200"  class=""/>
					</td>
					<td class="tdLabel"><%=TszbProcessInfo.ALIAS_CALLER_NUMBER%></td>
					<td>
						<input value="${query.callerNumber}" id="callerNumber" name="callerNumber" maxlength="200"  class=""/>
					</td>
				</tr>

				<tr>

					<td class="tdLabel"><%=TszbProcessInfo.ALIAS_WORK_ORDER_SOURCE%></td>
					<td>
					<s:select  list="#dataDictManager.findAllByDdType('TSZB__WORK_ORDER_SOURCE')"   key="workOrderSource"  listKey="ddName" listValue="ddName"  theme="simple" headerKey=""  headerValue="请选择..."/>
					</td>
		<td class="tdLabel"><%=TszbProcessInfo.ALIAS_CURR_ACT_NAME%></td>
					<td>
					<s:select
							  list="%{@tx.bj12320.model.enums.ActivityEnum@toMap()}"
				                key="currActName"    theme="simple" headerKey=""  headerValue="请选择..." cssStyle="width:120px"/>
					</td>
					<td class="tdLabel"><%=TszbProcessInfo.ALIAS_PROC_START_TIME%></td>
					<td>
						<input value="<fmt:formatDate value='${query.procStartTimeBegin}' pattern='<%=TszbProcessInfo.FORMAT_PROC_START_TIME%>'/>" onclick="WdatePicker({dateFmt:'<%=TszbProcessInfo.FORMAT_PROC_START_TIME%>'})" id="procStartTimeBegin" name="procStartTimeBegin"   />
						<input value="<fmt:formatDate value='${query.procStartTimeEnd}' pattern='<%=TszbProcessInfo.FORMAT_PROC_START_TIME%>'/>" onclick="WdatePicker({dateFmt:'<%=TszbProcessInfo.FORMAT_PROC_START_TIME%>'})" id="procStartTimeEnd" name="procStartTimeEnd"   />
					</td>
					<td class="tdLabel"><%=TszbProcessInfo.ALIAS_IS_PROC_END%></td>
					<td>
						<s:radio list="%{@tx.bj12320.model.enums.BooleanEnum@toMap()}" key="isProcEnd"   theme="simple"/>
					</td>

				</tr>

				<tr>
					<td class="tdLabel"><%=TszbProcessInfo.ALIAS_PROC_END_TIME%></td>
					<td>
						<input value="<fmt:formatDate value='${query.procEndTimeBegin}' pattern='<%=TszbProcessInfo.FORMAT_PROC_END_TIME%>'/>" onclick="WdatePicker({dateFmt:'<%=TszbProcessInfo.FORMAT_PROC_END_TIME%>'})" id="procEndTimeBegin" name="procEndTimeBegin"   />
						<input value="<fmt:formatDate value='${query.procEndTimeEnd}' pattern='<%=TszbProcessInfo.FORMAT_PROC_END_TIME%>'/>" onclick="WdatePicker({dateFmt:'<%=TszbProcessInfo.FORMAT_PROC_END_TIME%>'})" id="procEndTimeEnd" name="procEndTimeEnd"   />
					</td>
					<td class="tdLabel"><%=TszbProcessInfo.ALIAS_IS_REJECT%></td>
					<td>
						<s:radio list="%{@tx.bj12320.model.enums.BooleanEnum@toMap()}" key="isReject"   theme="simple"/>
					</td>
<td class="tdLabel"><%=TszbProcessInfo.ALIAS_INCOMING_CALL_CONTENT%></td>
					<td>
						<input value="${query.incomingCallContent}" id="incomingCallContent" name="incomingCallContent" maxlength="4000"  class=""/>
					</td>
				</tr>
			</table>
		</fieldset>
		<div class="handleControl">
			<input type="submit" class="stdButton" style="width:80px" value="查询" onclick="getReferenceForm(this).action='${ctx}/pages/TszbProcessInfo/tszbProcessInfoList.do'"/>
			 <s:if test="%{@tx.bj12320.util.WebUtils@is12320User()}">
			<input type="button" class="stdButton" style="width:80px" value="删除" onclick="batchDelete('${ctx}/pages/TszbProcessInfo/deleteTszbProcessInfo.do','items',document.forms.queryForm)"/>
			</s:if>
		<div>
	</div>

	<div class="gridTable">

		<simpletable:pageToolbar page="${page}">
		</simpletable:pageToolbar>

		<table width="100%"  border="0" cellspacing="0" class="gridBody">
		  <thead>

			  <tr>
				<th style="width:1px;"> </th>
				<th style="width:1px;"><input type="checkbox" onclick="setAllCheckboxState('items',this.checked)"></th>

				<!-- 排序时为th增加sortColumn即可,new SimpleTable('sortColumns')会为tableHeader自动增加排序功能; -->
				<th sortColumn="ORG_INFO_ID" >网络单位</th>
				<th sortColumn="WORK_ORDER_TYPE" ><%=TszbProcessInfo.ALIAS_WORK_ORDER_TYPE%></th>
				<th sortColumn="CALLER_NAME" ><%=TszbProcessInfo.ALIAS_CALLER_NAME%></th>
				<th sortColumn="CALLER_NUMBER" ><%=TszbProcessInfo.ALIAS_CALLER_NUMBER%></th>
				<th sortColumn="WORK_ORDER_SOURCE" ><%=TszbProcessInfo.ALIAS_WORK_ORDER_SOURCE%></th>
				<th sortColumn="CURR_ACT_NAME" ><%=TszbProcessInfo.ALIAS_CURR_ACT_NAME%></th>
				<th sortColumn="PROC_START_TIME" ><%=TszbProcessInfo.ALIAS_PROC_START_TIME%></th>
				<th sortColumn="IS_PROC_END" ><%=TszbProcessInfo.ALIAS_IS_PROC_END%></th>


				<th>操作</th>
			  </tr>

		  </thead>
		  <tbody>
		  	  <c:forEach items="${page.result}" var="item" varStatus="status">

			  <tr class="${status.count % 2 == 0 ? 'odd' : 'even'}">
				<td>${page.thisPageFirstElementNumber + status.index}</td>
				<td><input type="checkbox" name="items" value="tszbProcessInfoId=${item.tszbProcessInfoId}&"></td>

				<td><c:out value='${item.orgInfo.orgName}'/>&nbsp;</td>
				<td><c:out value='${item.workOrderTypeString}'/>&nbsp;</td>
				<td><c:out value='${item.callerName}'/>&nbsp;</td>
				<td><c:out value='${item.callerNumber}'/>&nbsp;</td>
				<td><c:out value='${item.workOrderSource}'/>&nbsp;</td>
				<td><c:out value='${item.currActNameString}'/>&nbsp;</td>
				<td><c:out value='${item.procStartTimeString}'/>&nbsp;</td>
				<td><c:out value='${item.isProcEndString}'/>&nbsp;
					<c:if test="${empty item.workOrderIssueTime}"><font color="blue">【网络单位待签收】</font></c:if>
					<c:if test="${not empty item.workOrderIssueTime && empty item.workOrderDealTime}">【网络单位办理中】</c:if>
					<c:if test="${not empty item.workOrderDealTime}">【网络单位办理完成】</c:if>
				</td>

				<td>
					<a href="${ctx}/pages/TszbProcessInfo/toViewTask.do?tszbProcessInfoId=${item.tszbProcessInfoId}&">查看</a>&nbsp;&nbsp;&nbsp;
				</td>
			  </tr>

		  	  </c:forEach>
		  </tbody>
		</table>

		<simpletable:pageToolbar page="${page}">
		</simpletable:pageToolbar>
	</div>
	</form>
</rapid:override>

<%-- jsp模板继承,具体使用请查看: http://code.google.com/p/rapid-framework/wiki/rapid_jsp_extends --%>
<%@ include file="base.jsp" %>

